package yawning.mew.character;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class ToonToonBuilder {
	public ToonToonBuilder() {}

	@SuppressWarnings("unchecked")
	public Toon build(Toon src) {
		Toon toon = new Toon();

		toon.level = src.level;
		toon.mClass = src.mClass;
		toon.mRace = src.mRace;

		toon.strength = src.strength;
		toon.agility = src.agility;
		toon.stamina = src.stamina;
		toon.intellect = src.intellect;
		toon.spirit = src.spirit;
		toon.armor = src.armor;
		toon.bonusArmor = src.bonusArmor;

		toon.attackPower = src.attackPower;
		toon.mDodgeRating = src.mDodgeRating;
		toon.mParryRating = src.mParryRating;
		toon.hasteRating = src.hasteRating;
		toon.critRating = src.critRating;
		toon.hitRating = src.hitRating;
		toon.expertiseRating = src.expertiseRating;
		toon.masteryRating = src.masteryRating;
		toon.mResilienceRating = src.mResilienceRating;

		toon.weaponTop = src.weaponTop;
		toon.weaponBottom = src.weaponBottom;
		toon.weaponSpeed = src.weaponSpeed;

		toon.tier_10_2pc = src.tier_10_2pc;
		toon.tier_10_4pc = src.tier_10_4pc;
		toon.tier_11_2pc = src.tier_11_2pc;
		toon.tier_11_4pc = src.tier_11_4pc;
		toon.tier_12_2pc = src.tier_12_2pc;
		toon.tier_12_4pc = src.tier_12_4pc;
		toon.tier_13_2pc = src.tier_13_2pc;
		toon.tier_13_4pc = src.tier_13_4pc;

		toon.pvp_gloves = src.pvp_gloves;

		toon.isArmorSpec = src.isArmorSpec;
		toon.isWeaponRacial = src.isWeaponRacial;
		toon.mMetaGem = src.mMetaGem;
		toon.mTalentSpec = src.mTalentSpec;


		toon.mGlyphs = (Set<Glyph>) ((HashSet<Glyph>) src.mGlyphs).clone();
		toon.mTalents = src.mTalents.clone();
		toon.mProfessions = (Map<Profession, Integer>) (((HashMap<Profession, Integer>) src.mProfessions).clone());

		return toon;
	}
}
